home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / ver_cont / cvs-1.8 / cvs-1 / cvs-1.8.1 / Makefile.in < prev    next >
Encoding:
Makefile  |  1996-05-06  |  7.4 KB  |  265 lines

  1. # Master Makefile for the GNU Concurrent Versions System.
  2. # Copyright (C) 1986, 1988-1992, 1994 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # $CVSid: @(#)Makefile.in 1.30 94/10/22 $
  19.  
  20. SHELL = /bin/sh
  21.  
  22. #### Start of system configuration section. ####
  23.  
  24. srcdir = @srcdir@
  25. top_srcdir = @top_srcdir@
  26. VPATH = @srcdir@
  27.  
  28. # If you use gcc, you should either run the fixincludes script that
  29. # comes with it or else use gcc with the -traditional option.  Otherwise
  30. # ioctl calls will be compiled incorrectly on some systems.
  31. CC = @CC@
  32. AR = ar
  33.  
  34. @SET_MAKE@
  35.  
  36. # Set RANLIB = echo if your system doesn't have or need ranlib.
  37. RANLIB = @RANLIB@
  38. # Set YACC = bison or yacc, depending on which you have on your system
  39. YACC = @YACC@
  40. # Use cp if you don't have install.
  41. INSTALL = @INSTALL@
  42. INSTALL_DATA = @INSTALL_DATA@
  43. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  44.  
  45. DEFS = @DEFS@
  46. LIBS = @LIBS@
  47.  
  48. INCLUDES = -I. -I../lib @includeopt@
  49. CFLAGS = @CFLAGS@
  50. LDFLAGS = @LDFLAGS@
  51.  
  52. MAKEINFO = makeinfo
  53. TEXI2DVI = texi2dvi
  54.  
  55. prefix = @prefix@
  56. exec_prefix = @exec_prefix@
  57.  
  58. # Where to install the executables.
  59. bindir = $(exec_prefix)/bin
  60.  
  61. # Where to put the system-wide .cvsrc file
  62. libdir = $(prefix)/lib
  63.  
  64. # Where to put the Info files
  65. infodir = $(prefix)/info
  66.  
  67. # Where to put the manual pages.
  68. mandir = $(prefix)/man
  69.  
  70. #### End of system configuration section. ####
  71.  
  72. FLAGS_TO_PASS = \
  73.     AR='$(AR)' \
  74.     CC='$(CC)' \
  75.     CFLAGS='$(CFLAGS)' \
  76.     LDFLAGS='$(LDFLAGS)' \
  77.     LIBPROGS='$(LIBPROGS)' \
  78.     LIBS='$(LIBS)' \
  79.     MAKE='$(MAKE)' \
  80.     MAKEINFO='$(MAKEINFO)' \
  81.     RANLIB='$(RANLIB)' \
  82.     TEXI2DVI='$(TEXI2DVI)' \
  83.     YACC='$(YACC)' \
  84.     bindir='$(bindir)' \
  85.     infodir='$(infodir)' \
  86.     libdir='$(libdir)' \
  87.     mandir='$(mandir)' \
  88.     prefix='$(prefix)' \
  89.     exec_prefix='$(exec_prefix)'
  90.  
  91. DISTFILES = \
  92.     COPYING COPYING.LIB INSTALL README TODO PROJECTS \
  93.     BUGS MINOR-BUGS FAQ HACKING \
  94.     ChangeLog NEWS ChangeLog.zoo \
  95.     configure configure.in stamp-h.in config.h.in Makefile.in acconfig.h \
  96.     cvs-format.el mkinstalldirs install-sh \
  97.     cvsnt.mak \
  98.     .cvsignore
  99.  
  100. ### Subdirectories to run make in for the primary targets.
  101. # Unix source subdirs, where we'll want to run lint and etags:
  102. USOURCE_SUBDIRS = lib src
  103. # All other subdirs:
  104. SUBDIRS = ${USOURCE_SUBDIRS} man doc contrib tools windows-NT os2 macintosh
  105. # Only make TAGS/tags files in these directories, in this order
  106. #    [Why in this order?  If we didn't have to stick to this order, we
  107. #    could make "TSUBDIRS = ${USOURCE_SUBDIRS}".  -Karl]
  108. TSUBDIRS= src lib
  109.  
  110. # Set default target.
  111. all:
  112.  
  113. .PHONY: all install uninstall
  114. all install uninstall: config.h Makefile all-local
  115.     @for subdir in $(SUBDIRS); do \
  116.       echo "making $@ in $$subdir"; \
  117.       ( cd $$subdir && $(MAKE) $(FLAGS_TO_PASS) $@ ) || exit 1; \
  118.     done
  119.  
  120. install: all install-local install-info
  121.  
  122. .PHONY: all-local
  123. all-local:
  124.  
  125. .PHONY: info dvi clean-info install-info
  126. info dvi clean-info install-info:
  127.     cd doc && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1
  128.  
  129. .PHONY: install-local
  130. install-local: all-local
  131.     @: nothing to do locally
  132.  
  133. .PHONY: tags
  134. tags:
  135.     @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  136.     @echo making $@ in .
  137.     @ctags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls\` ; do echo $(srcdir)/$$i ; done`
  138.  
  139. .PHONY: TAGS
  140. TAGS:
  141.     @for dir in $(TSUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  142.     @echo making $@ in .
  143.     @etags `for i in \`$(MAKE) SUBDIRS="$(TSUBDIRS)" ls | grep -v 'make\[[0-9]\]'\` ; do echo $(srcdir)/$$i ; done`
  144.  
  145. .PHONY: ls
  146. ls:
  147.     @echo $(DISTFILES)
  148.     @for dir in $(SUBDIRS); do \
  149.         for i in `cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ | grep -v 'make\[[0-9]\]'` ; do \
  150.             echo $$dir/$$i ; \
  151.         done ; \
  152.     done
  153.  
  154. .PHONY: clean
  155. clean: clean-local
  156.     @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  157.  
  158. .PHONY: distclean
  159. distclean: distclean-local
  160.     @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  161.     rm -f config.status
  162.  
  163. .PHONY: realclean
  164. realclean: realclean-local
  165.     @for dir in $(SUBDIRS); do echo making $@ in $$dir; cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  166.     rm -f config.status
  167.  
  168. .PHONY: mostlyclean-local
  169. mostlyclean-local:
  170.     rm -f *~
  171.  
  172. .PHONY: clean-local
  173. clean-local: mostlyclean-local
  174.  
  175. .PHONY: distclean-local
  176. distclean-local: clean-local
  177.     rm -f Makefile config.cache config.h config.log stamp-h
  178.     rm -f tags TAGS
  179.  
  180. .PHONY: realclean-local
  181. realclean-local: distclean-local
  182.  
  183. .PHONY: saber
  184. saber:
  185.     @for dir in $(SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) $@ || exit 1; cd ..; done
  186.  
  187. .PHONY: check
  188. check:
  189.     cd lib ; $(MAKE) $(FLAGS_TO_PASS)
  190.     cd src ; $(MAKE) $(FLAGS_TO_PASS) check
  191.  
  192. .PHONY: remotecheck
  193. remotecheck:
  194.     cd lib ; $(MAKE) $(FLAGS_TO_PASS)
  195.     cd src ; $(MAKE) $(FLAGS_TO_PASS) remotecheck
  196.  
  197. .PHONY: installcheck
  198. installcheck:
  199.     cd lib ; $(MAKE) $(FLAGS_TO_PASS)
  200.     cd src ; $(MAKE) $(FLAGS_TO_PASS) installcheck
  201.  
  202. .PHONY: lint
  203. lint:
  204.     @for dir in $(USOURCE_SUBDIRS); do cd $$dir && $(MAKE) $(FLAGS_TO_PASS) xlint || exit 1; cd ..; done
  205.  
  206. .PHONY: dist
  207. GZIP=gzip --best
  208. GZIP_EXT=.gz
  209. TAR_VERBOSE=
  210. dist:
  211.     echo > .fname \
  212.       cvs-`sed < $(srcdir)/src/version.c \
  213.             -e '/version_string/!d' \
  214.             -e 's/[^0-9.]*\([0-9.]*\).*/\1/' \
  215.             -e q`
  216.     rm -rf `cat .fname`
  217.     ${MAKE} dist-dir DISTDIR="`cat .fname`"
  218.     for dir in ${SUBDIRS}; do \
  219.       ( DISTDIR="../`cat .fname`/$${dir}"; \
  220.             cd $${dir} && \
  221.         ${MAKE} dist-dir DISTDIR="$${DISTDIR}" \
  222.       ); \
  223.     done
  224.     tar chf${TAR_VERBOSE} - `cat .fname` | ${GZIP} > "`cat .fname`.tar${GZIP_EXT}"
  225.     rm -rf `cat .fname` .fname
  226.  
  227. .PHONY: dist-dir
  228. dist-dir:
  229.     mkdir ${DISTDIR}
  230.     for i in ${DISTFILES}; do \
  231.       ln $(srcdir)/$${i} ${DISTDIR}; \
  232.     done
  233.  
  234. # For the justification of the following Makefile rules, see node
  235. # `Automatic Remaking' in GNU Autoconf documentation.
  236. Makefile: Makefile.in config.status
  237.     CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
  238. config.status: configure
  239.     ./config.status --recheck
  240. # The rules to run autoconf and autoheader are commented out.  This is because
  241. # when the user unpacks a tarfile, configure.in might end up newer than 
  242. # configure, but the user might not have (and does not need to have) autoconf
  243. # installed.
  244. #configure: configure.in #aclocal.m4
  245. #    cd $(srcdir); autoconf
  246.  
  247. config.h: stamp-h
  248.  
  249. # This used to do a ./config.status --recheck, to update config.status with
  250. # any new #defines from config.h.in.  The problem was that the rule itself
  251. # depends on config.status, so that the --recheck would get run several
  252. # times, which is bad if the user was trying to specify CFLAGS manually.
  253. # It was a big pain in the neck.
  254. stamp-h: config.h.in config.status
  255.     CONFIG_FILES=$@ CONFIG_HEADERS=config.h ./config.status
  256.  
  257. #config.h.in: stamp-h.in
  258. #stamp-h.in: configure.in #aclocal.m4 acconfig.h
  259. #    cd $(srcdir); autoheader
  260. #    date > $(srcdir)/stamp-h.in
  261.  
  262. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  263. # Otherwise a system limit (for SysV at least) may be exceeded.
  264. .NOEXPORT:
  265.